home *** CD-ROM | disk | FTP | other *** search
Text File | 1997-10-06 | 4.6 KB | 255 lines | [TEXT/POV3] |
- // Persistence of Vision Ray Tracer Scene Description File
- // File: A Torus Line.pov
- // Vers: 3
- // Desc: Simple POV-Ray scene file for MooVer 1.5
- // Date: 10/1/97
- // Auth: Eduard Schwan
- //
-
- #version 3
-
- #include "colors.inc"
-
- // ----------------------------------------
- // Animation
- // ----------------------------------------
-
- #declare MyClock = (clock*2)-1
-
- // ----------------------------------------
- // Lights, Camera, Firmament
- // ----------------------------------------
-
- global_settings
- {
- assumed_gamma 1.0
- }
-
- camera
- {
- location <6.0, 7.0, -7.0>
- direction 1*z
- right 2*x
- look_at <0.0, 0.0, 0.0>
- }
-
- sky_sphere
- {
- pigment
- {
- gradient y
- color_map
- {
- [0.0 color rgb <0.3,0.5,0.8>]
- [0.5 color rgb <0.0,0.1,0.3>]
- [0.9 color rgb 0.0]
- }
- }
- }
-
- light_source
- {
- 0*x // light's position (translated below)
- color red 1.0 green 1.0 blue 1.0 // light's color
- translate <-30, 30, -30>
- }
-
- // ----------------------------------------
- // Gunbarrel declaration
- // ----------------------------------------
-
- #declare GunBarrelTexture =
- texture
- {
- pigment
- { radial frequency 10
- color_map
- { [0.69 rgbf 1] [0.70 rgb <0.0,0.1,0.0>] }
- }
- finish { refraction 1 ior 1.2 reflection 0.2 specular 0.7 roughness 0.1 }
- }
-
- #declare GunBarrelShape =
- union
- {
- cylinder { 0*y, 10*y, 0.5 open }
- torus {1, 0.5 clipped_by { cylinder { 0*y, -1*y, 1 open } } }
- translate 0.5*y
- scale <1,3,1>
- }
-
- // ----------------------------------------
- // Bullet declaration
- // ----------------------------------------
-
- #declare BulletTexture =
- texture
- {
- pigment { rgb <0.1,0.2,0.1> }
- finish { reflection 0.1 specular 0.5 roughness 0.1 }
- }
-
- #declare BulletShape =
- union
- {
- cylinder { 0*y, 0.5*y, 0.4 }
- sphere { 0, 0.4 }
- }
-
- // ----------------------------------------
- // Holed Donut declaration
- // ----------------------------------------
-
- #declare DonutTexture =
- texture
- {
- pigment { rgbf <1,0,0,0> }
- finish { /*refraction 1 ior 1.2*/ reflection 0.2 specular 0.5 roughness 0.1 }
- }
-
- #declare DonutHoleShape = // Donut with hole
- torus { 1.0, 0.5 }
-
- // ----------------------------------------
- // Changing Donut declaration
- // ----------------------------------------
-
- #if (MyClock < -0.1)
- #declare MorphWidth = 0.5
- #else
- #if (MyClock < 0.1)
- #declare MorphWidth = (0.1-MyClock)
- #else
- #declare MorphWidth = 0.0
- #end
- #end
- #declare DonutMorphShape = // Donut with partial plug
- merge
- {
- object {DonutHoleShape} // the donut
- #if (MorphWidth > 0)
- cylinder {-MorphWidth*y, +MorphWidth*y, 1.0} // the plug
- #end
- }
-
- // ----------------------------------------
- // Plugged Donut declaration
- // ----------------------------------------
-
- #declare DonutPlugShape = // Donut with full plug
- merge
- {
- object {DonutHoleShape} // the donut
- cylinder {-0.5*y, 0.5*y, 1.0} // the plug
- }
-
- // ----------------------------------------
- // Gunbarrel & Catcher
- // ----------------------------------------
-
- object
- {
- GunBarrelShape
- texture { GunBarrelTexture }
- translate 3*y
- rotate MyClock*36*y
- }
-
- object
- {
- GunBarrelShape
- texture { GunBarrelTexture }
- rotate 180*x
- translate -4*y
- rotate MyClock*36*y
- }
-
- // ----------------------------------------
- // Balls
- // ----------------------------------------
-
- object
- {
- BulletShape
- texture { BulletTexture }
- translate -6*MyClock*y
- }
-
- // ----------------------------------------
- // Main Donuts
- // ----------------------------------------
-
- #declare Spacing = 4
-
- // plugged donuts
- #declare Count = 16
- #while (Count > 0)
- object
- {
- DonutPlugShape
- texture { DonutTexture }
- translate -Count*Spacing*x
- translate MyClock*Spacing*x/2
- }
- #declare Count = Count-1
- #end
-
- // morphing donut
- object
- {
- DonutMorphShape
- texture { DonutTexture }
- translate +0*x
- translate MyClock*Spacing*x/2
- }
-
- // holed donuts
- #declare Count = 5
- #while (Count > 0)
- object
- {
- DonutHoleShape
- texture { DonutTexture }
- translate +Count*Spacing*x
- translate MyClock*Spacing*x/2
- }
- #declare Count = Count-1
- #end
-
-
- // ----------------------------------------
- // Secondary Donuts (right angles)
- // ----------------------------------------
-
- // holed donuts
- #declare Count = 50
- #while (Count > 0)
- object
- {
- DonutHoleShape
- texture { DonutTexture }
- translate <-20, -5, -30 - MyClock*Spacing*2 + Count*Spacing*2>
- rotate 20*y // angle across view a little more
- }
- #declare Count = Count-1
- #end
-
-
- // ----------------------------------------
- // Tertiary Donuts (in back)
- // ----------------------------------------
-
- // holed donuts
- #declare Count = 50
- #while (Count > 0)
- object
- {
- DonutHoleShape
- texture { DonutTexture }
- translate <30 - MyClock*Spacing*2 - Count*Spacing*2, -10, 40>
- }
- #declare Count = Count-1
- #end
-
-
-